//
//  WTUserInfoModel.m
//  WTLiveSDKDemo
//
//  Created by ben on 16/10/7.
//  Copyright © 2016年 ben. All rights reserved.
//

#import "WTUserInfoModel.h"
#import "MJExtension.h"

@implementation WTUserPrivateInfo

+ (NSDictionary *)replacedKeyFromPropertyName {
    return @{@"privateinfo_address":@"Address",
             @"privateinfo_avatar":@"Avatar",
             @"privateinfo_cutecode":@"CuteCode",
             @"privateinfo_id":@"Id",
             @"privateinfo_mobile":@"Mobile",
             @"privateinfo_signature":@"Signature",
             @"privateinfo_sex":@"Sex",
             @"privateinfo_mobile_auth":@"Mobile_auth",
             @"privateinfo_name":@"Name",
             @"privateinfo_anchor_push":@"Anchor_push"};
}

@end

@implementation WTUserRelationInfo


+ (NSDictionary *)replacedKeyFromPropertyName {
    return @{@"relationinfo_expense":@"Expense",
             @"relationinfo_fans":@"Fans",
             @"relationinfo_focus":@"Focus",
             @"relationinfo_income":@"Income",
             @"relationinfo_isfocus":@"IsFocus",
             @"relationinfo_level":@"Level"};
}

@end

@implementation WTUserInfoModel
- (instancetype)initWithUserInfo:(NSDictionary*)userInfo{

    if(self = [super init]){
        self.userPrivateInfoModel = [WTUserPrivateInfo mj_objectWithKeyValues:userInfo[@"PrivateInfo"]];
        self.userRelationInfoModel = [WTUserRelationInfo mj_objectWithKeyValues:userInfo[@"RelationInfo"]];
    }
    return self;
}

- (NSDictionary*)userInfoJson{
    return @{@"PrivateInfo":[self.userPrivateInfoModel mj_JSONObject],@"RelationInfo":[self.userRelationInfoModel mj_JSONObject]};
 
}
@end
